<div class="wrapper">
    <div>
        <div class="box box-top">
            <!-- /.box-header -->
            <!-- form start -->
            <form id="riderOrderForm" role="form" action="${base}/admin/riderOrder/save" method="post">
                <input type="hidden" name="id" value="${(riderOrder.id?c)!}">
                <input type="hidden" name="batteryNo" value="${(riderOrder.batteryNo)!}">
                <div class="box-body">
                        <div class="form-group">
                            <label for="phone">会员phone</label>
                            ${(riderOrder.phone)!} ${(riderOrder.riderName)!}
                        </div>
                        <div class="form-group">
                            <label for="batteryNo">电池No</label>
                            ${(riderOrder.batteryNo)!}
                        </div>
                        <div class="form-group">
                            <label for="beginDate">开始日期</label>
                            ${nav.getDate((riderOrder.beginDate)!"")}
                        </div>
                        <div class="form-group">
                            <label for="endDate">结束日期</label>
                            ${nav.getDate((riderOrder.endDate)!"")}
                            <input type="hidden" value="${(riderOrder.endDate)!}" class="form-control" name="endDate" id="endDate">
                        </div>
                        <div class="form-group">
                            <label for="status">Status</label>
                            <select name="status" id="status" class="form-control">
                                <option value="0" <#if ((riderOrder.status)!0)==0> selected="selected"</#if>>----未完成----</option>
                                <option value="1" <#if ((riderOrder.status)!0)==1> selected="selected"</#if>>----已经结束----</option>
                            </select>
                        </div>

                        <div class="form-group">
                            <label for="takeVoltage">取电压</label>
                            <input type="text" value="${(riderOrder.takeVoltage)!}" class="form-control" name="takeVoltage" id="takeVoltage">
                        </div>
                        <div class="form-group">
                            <label for="backVoltage">还电压</label>
                            <input type="text" value="${(riderOrder.backVoltage)!}" class="form-control" name="backVoltage" id="backVoltage">
                        </div>
                        <div class="form-group">
                            <label for="runOrders">订单数</label>
                            <input type="text" value="${(riderOrder.runOrders)!}" class="form-control" name="runOrders" id="runOrders">
                        </div>
                        <div class="form-group">
                            <label for="runKilometers">公里数</label>
                            <input type="text" value="${(riderOrder.runKilometers)!}" class="form-control" name="runKilometers" id="runKilometers">
                        </div>
                        <div class="form-group">
                            <label for="specialCase">特殊情况</label>
                            <input type="text" value="${(riderOrder.specialCase)!}" class="form-control" name="specialCase" id="specialCase">
                        </div>
                    <div class="form-group">
                            <label for="carCase">车辆情况</label>
                            <input type="text" value="${(riderOrder.carCase)!}" class="form-control" name="carCase" id="carCase">
                        </div>
                    <div class="box-footer">
                        <button type="button" onclick="$('#riderOrderForm').submit();" class="btn btn-primary">Save
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function() {
        $("#riderOrderForm").validate({
            submitHandler:function(form){
                submitRiderOrder();
            }
        });
    });
    function submitRiderOrder(){
        HF.ajaxFormSubmit('riderOrderForm',function(result){
            alert("Save Success");
            document.location.reload();
        },function(e){ alert("Save Failure");});
    }
</script>
